using System;
using System.Web.UI.WebControls;
using TPG.SharePoint.Workflow;

namespace $rootnamespace$
{
    public partial class $safeitemname$ 
        : AssociationPage
    {
        protected TextBox MyAssociationField = null;

        protected override void OnLoad(EventArgs e)
        {
            if(IsNewAssociation == false && IsInitialLoad)
            {
                string data = GetAssociationData();
                MyAssociationField.Text = data;
            }
            base.OnLoad(e);
        }

        protected void OkButton_Click(object sender, EventArgs e)
        {
            string newAssociationData = MyAssociationField.Text;
            CommitAssocation(newAssociationData);
        }

        protected void CancelButton_Click(object sender, EventArgs e)
        {
            CancelAssociation();
        }
    }
}